package com.fozu.common.util;

import java.util.UUID;

public class IdGen {
	
	public static void main(String[] args) {
		getId();
	}
	
	/**
	 * 获取UUID
	 * @return
	 */
	public static String getNextId(){
		return UUID.randomUUID().toString().replaceAll("-", "");
	}
	
	/**
	 * 获取用户ID
	 */
	public static String getId(){
		String uuid = UUID.randomUUID().toString().replaceAll("-", "").toUpperCase();
		String first = uuid.substring(0,8);
		Long second =  System.currentTimeMillis()/10000000;
		String userId = first+second;
		return userId;
	}
	
	

}
